package com.milkshopbackend.milkshop.Service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.milkshopbackend.milkshop.entity.*;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

public interface UserService extends IService<User> {

    @Transactional
    User register(UserRegisterDTO userRegisterDTO);

    String login(UserLoginDTO loginDTO);

    User getUserByUsername(String username);

    void updateProfile(UserProfileUpdateDTO profileDTO);

    String uploadAvatar(MultipartFile file);

    void updatePassword(UserPasswordUpdateDTO dto);

    void sendResetCode(String email);

    void resetPassword(UserResetPasswordDTO dto);

    User getById(Long userId);
}
